export default {
  QueryRouteManageList({ commit }, param) {
    let config = {
      headers: {
        "Content-Type": "application/json;charset=UTF-8"
      }
    };
    return window.$http
      .post(`apis/route/list`, { tenantCode: param.tenantCode }, null, config)
      .then(response => response && response.data);
  },
  SaveRouteManage({ commit }, param) {
    let tag = param.isAdd ? "add" : "update";
    return window.$http.post(`apis/route/${tag}`, param).then(response => response && response.data);
  },
  DeleteRouteManage({ commit }, param) {
    return window.$http.get(`apis/route/del?id=` + param.id).then(response => response && response.data);
  },
  Apply({ commit }, param) {
    return window.$http.get(`apis/route/apply`).then(response => response && response.data);
  },
  getApplicationByTenantCode({ commit }, param) {
    return window.$http.post(`apis/mgt/application/getApplicationByTenantCode?tenantCode=${param.tenantCode}`);
  }
};
